|
|
 |
|
|
|
|
rchStatements.SelStart = 0
rchStatements.SelLength = 10
rchStatements.SelBold = True |
|
|
|
|
|
|
|
|
The following are some of the rich text box properties that you can change to modify the selected text: |
|
|
|
|
|
|
|
|
SelBold. Determines whether the selected text is bold. |
|
|
|
|
|
|
|
|
SelCharOffset. Determines whether the selected text is in a normal, superscript, or subscript position. If SelCharOffset is 0, the text is in a normal position. If SelCharOffset > 0, the text is raised by SelCharOffset twips. If SelCharOffset < 0, the text is lowered by SelCharOffset twips. Unfortunately, the control does not allow extra room for raised or lowered characters, so they may be partially obscured by the previous and following lines. |
|
|
|
|
|
|
|
|
SelColor. The selected text's color. |
|
|
|
|
|
|
|
|
SelFontName. The selected text's font name. |
|
|
|
|
|
|
|
|
SelFontSize. The selected text's font size. |
|
|
|
|
|
|
|
|
SelItalic. Determines whether the selected text is italicized. |
|
|
|
|
|
|
|
|
SelStrikethru. Determines whether the selected text is stricken through. |
|
|
|
|
|
|
|
|
SelUnderline. Determines whether the selected text is underlined. |
|
|
|
|
|
|
|
|
Rich text boxes also have several paragraph-formatting properties. The units used by the BulletIndent, SelHangingIndent, SelIndent, and SelRightIndent properties are determined by the ScaleMode property of the form containing the rich text box. |
|
|
|
|
|
|
|
|
BulletIndent. Determines the amount by which text is indented when SelBullet is true. |
|
|
|
|
|
|
|
|
SelAlignment. Sets paragraph alignment: |
|
|
|
 |
|
|
|
|
RtfLeft. Paragraphs are left justified. |
|
|
|
 |
|
|
|
|
RtfRight. Paragraphs are right justified. |
|
|
|
 |
|
|
|
|
RtfCenter. Paragraphs are centered. |
|
|
|
 |
|
|
|
|
Null. The selected text contains paragraphs with more than one alignment. |
|
|
|
|
|
|
|
|
SelBullet. Determines whether paragraphs are bulleted. If SelBullet is Null, the selected text contains both bulleted and non-bulleted paragraphs. |
|
|
|
|
|
|
|
|
SelHangingIndent. Specifies the distance between the left edge of the first and subsequent lines in paragraphs. If the selected text contains paragraphs with different hanging indent values, SelHangingIndent is zero. |
|
|
|
|
|
|
|
|
SelIndent. Specifies the distance between the left edge of the rich text box and the left edge of the text. If the selected text contains paragraphs with different indent values, SelIndent is zero. |
|
|
|
|
|
|
|
|
SelRightIndent. Specifies the distance between the right edge of the rich text box and the left edge of the text. If the selected text contains paragraphs with different right indent values, SelRightIndent is zero. |
|
|
|
|
|